<?php
/* v3.1.0  */

class Home extends M_Controller
{


    /**
     * 首页
     */
    public function index()
    {
        $this->_indexc();
    }

    //网站帮助
    public function mpHelp()
    {
        $result = $this->models('Site/linkage')->linkInfo('help', 'id,name,answer', $this->input->get('code'));
        apiSuccess(1, 'success', [
            'list' => $result,
            'banner' => SITE_URL . dr_get_file(dr_block('help_banner'))
        ]);
    }

    // 联系我们
    public function contactUs()
    {
        apiSuccess(1, 'success', [
            'phone' => explode('|', dr_block('phone')),
            'email' => dr_block('email')
        ]);
    }

    // 关于我们
    public function aboutUs()
    {
        apiSuccess(1, 'success', ['about' => dr_block('about_us')]);
    }

    // 测试支付
    public function testPay()
    {
        $result = $this->models('system/pay')->paySuccess('given', 160);
        var_dump($result);
        echo 'success';
    }
}

